package cn.qiguai.sphapi.controller.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 请求状态码
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum Status {
	SAVE_OK(20011, "保存成功！"),
	SAVE_ERR(20010, "保存失败！"),
	DELETE_OK(20021, "删除成功！"),
	DELETE_ERR(20020, "删除失败！"),
	UPDATE_OK(20031, "修改成功！"),
	UPDATE_ERR(20030, "修改失败！"),
	SELECT_OK(20041, "查询成功！"),
	SELECT_ERR(20040, "查询失败！"),
	LOGIN_OK(20051, "登陆成功！"),
	LOGIN_ERR(20050, "登陆失败！手机号或密码错误！"),
	PAY_OK(20061, "支付成功！"),
	PAY_ERR(20060, "支付失败！"),
	COMMIT_ORDER_OK(20071, "提交订单成功！请在30分钟内付款！"),
	COMMIT_ORDER_ERR(20070, "提交订单失败！请与管理员联系！"),
	REGISTER_OK(20081, "注册成功！"),
	REGISTER_ERR(20080, "注册失败！"),
	ADD_CART_OK(20091, "商品已成功添加至购物车！"),
	ADD_CART_ERR(20090, "商品添加至购物车失败！"),
	PARAM_ERR(20000, "请求参数有误！"),
	SYSTEM_ERR(50000, "系统错误！"),
	BUSINESS_ERR(60000, "业务错误！"),
	UNKNOWN_ERR(70000, "未知异常！");

	private int code;
	private String msg;
}
